home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / idcutils.zip / EJECT.ASM < prev    next >
Assembly Source File  |  1990-06-07  |  1KB  |  69 lines

  1. ;
  2. ; Program    : EJECT.ASM
  3. ; Author    : Gary Conway
  4. ; Created    : 5/22/90
  5. ; Update    :
  6. ;
  7. ; Infinity Design Concepts, Inc.
  8. ; 1052 Parkway Drive
  9. ; Louisville, Kentucky 40217-2333
  10. ; Voice: (502) 636-1234
  11. ; Modem: (502) 635-5471
  12. ;
  13. ;
  14. ; send a cr,lf and formfeed to printer
  15. ; we could send just the FORMFEED, but some printers will not recognize
  16. ; the FORMFEED character, unless the print head is at column 0.
  17. ;
  18. ; Assemble with:
  19. ;
  20. ;    MASM EJECT;
  21. ;    LINK EJECT;
  22. ;    EXE2BIN EJECT.EXE EJECT.COM
  23. ;    DEL EJECT.EXE
  24.  
  25.  
  26. .XLIST
  27. .XCREF
  28.  
  29.  
  30.  
  31. CSEG        SEGMENT PARA PUBLIC 'CODE'
  32.         ASSUME CS:CSEG,DS:CSEG,ES:CSEG, SS:CSEG
  33.         ORG    100H
  34.  
  35. ENTPT        Proc
  36.  
  37.  
  38.  
  39.         Mov    SI,offset String
  40. Print:        Lodsb                ; get character to print
  41.         Or    AL,AL            ; end of string ?
  42.         Jz    Exit            ; yup, done
  43.         Mov    AH,5
  44.         Mov    DL,AL
  45.         Int    21h            ; print the character
  46.         Jmp    short Print        ; do em all!
  47.  
  48.  
  49. Exit:        Mov    AX,4C00h
  50.         Int    21h            ; back to DOS
  51.  
  52.  
  53.  
  54.  
  55. ENTPT        ENDP
  56.  
  57.  
  58.  
  59.  
  60. CR        Equ    13        ; CR may now be used instead of 13
  61. LF        Equ    10        ; LF "    "  "   "    "       " 10
  62. ESCchar        Equ    27        ; ESC (ESCape) character
  63.  
  64.  
  65. String        DB    CR,LF,12,0
  66. CSEG        ENDS
  67.  
  68.         END    ENTPT
  69.